package com.chagee.store.operation.server.transfer;

import com.chagee.store.operation.server.model.vo.WorkOrderExcelVO;

import com.chagee.store.operation.api.response.WorkOrderResponse;
import org.apache.commons.lang3.StringUtils;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @Author : hk
 * @Date : 2024/9/13
 */

@Mapper(componentModel = "spring")
public interface WorkOrderTransfer {

	@Mapping(target = "documentType", expression = "java(com.chagee.store.operation.api.enums.OrderStatusEnum.getByType(response.getDocumentType()).getDesc())")
	@Mapping(target = "documentStatus", expression = "java(com.chagee.store.operation.api.enums.StoreWorkOrderStatusEnum.getByType(response.getDocumentStatus()).getDesc())")
	@Mapping(target = "storeCategory", expression = "java(com.chagee.storeManagement.api.event.enums.StoreCategoryEnum.queryByType(response.getStoreCategory()).getDesc())")
	WorkOrderExcelVO workOrderResponse2WorkOrderExcelVOList(WorkOrderResponse response);

	List<WorkOrderExcelVO> workOrderResponse2WorkOrderExcelVOList(List<WorkOrderResponse> response);
}
